<div class="form-box container" style="padding: 35px 35px 15px;">
  <form nz-form [formGroup]="attrForm" (ngSubmit)="submitForm()">
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4" nzRequired>属性名称</nz-form-label>
      <nz-form-control nzSpan="20" nzHasFeedback nzErrorTip="请输入品牌名称">
        <input nz-input nzSize="large" formControlName="name">
      </nz-form-control>
    </nz-form-item>

    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">商品类型</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-select formControlName="productAttributeCategoryId" nzSize="large" nzAllowClear>
          <nz-option *ngFor="let option of attrCateOptions" [nzValue]="option.value" [nzLabel]="option.label"></nz-option>
        </nz-select>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">分类筛选样式</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-radio-group formControlName="filterType">
          <label nz-radio [nzValue]="0">普通</label>
          <label nz-radio [nzValue]="1">颜色</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">是否能进行检索</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-radio-group formControlName="searchType">
          <label nz-radio [nzValue]="0">不需要检索</label>
          <label nz-radio [nzValue]="1">关键字检索</label>
          <label nz-radio [nzValue]="2">范围检索</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">商品属性关联</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-radio-group formControlName="relatedStatus">
          <label nz-radio [nzValue]="1">是</label>
          <label nz-radio [nzValue]="0">否</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">属性是否可选</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-radio-group formControlName="selectType">
          <label nz-radio [nzValue]="0">唯一</label>
          <label nz-radio [nzValue]="1">单选</label>
          <label nz-radio [nzValue]="2">复选</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">属性值录入方式</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-radio-group formControlName="inputType">
          <label nz-radio [nzValue]="0">手工录入</label>
          <label nz-radio [nzValue]="1">从下面的列表中选择</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">属性值可选值列表</nz-form-label>
      <nz-form-control nzSpan="20">
        <textarea rows="4" nz-input formControlName="inputList"></textarea>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">是否支持手动新增</nz-form-label>
      <nz-form-control nzSpan="20">
        <nz-radio-group formControlName="handAddStatus">
          <label nz-radio [nzValue]="1">是</label>
          <label nz-radio [nzValue]="0">否</label>
        </nz-radio-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item nzJustify="center">
      <nz-form-label nzSpan="4">排序属性</nz-form-label>
      <nz-form-control nzSpan="20" nzHasFeedback nzErrorTip="排序只能为数字">
        <input nz-input nzSize="large" formControlName="sort">
      </nz-form-control>
    </nz-form-item>
    <button nz-button nzType="primary" type="submit">提交</button>
    <button nz-button *ngIf="!productAttr?.id" type="button" (click)="handleReset()">重置</button>
  </form>
</div>
